package com.ecoolex.chinadutyfree.retailer.ws;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.chinadutyfree.retailer.core.manager.StoreManager;
import com.ecoolex.chinadutyfree.retailer.core.manager.UserExternalInfoManager;
import com.ecoolex.chinadutyfree.retailer.entity.Store;
import com.ecoolex.chinadutyfree.retailer.entity.UserExternalInfo;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;

@Service
public class UnionPayStoreServiceImpl implements UnionPayStoreService{
	
	@Autowired
	private UserExternalInfoManager userExternalInfoManager;

	@Override
	public Boolean existByExternalUserId(String externalUserId) {
		return userExternalInfoManager.existByExternalUserId(externalUserId);
	}

	@Override
	public UserExternalInfo getByExternalUserId(String externalUserId) {
		return userExternalInfoManager.getByExternalUserId(externalUserId);
	}

	@Override
	public UserExternalInfo addUserExternalInfo(Integer userId, String externalUserId, String createUser) {
		return userExternalInfoManager.addUserExternalInfo(userId, externalUserId, createUser);
	}
	
	@Autowired
	private StoreManager storeManager;

	@Override
	public Store get(String storeId) {
		return storeManager.get(storeId);
	}
	
	@Override
	public Pagination<Store> queryStore(Page page) {
		return storeManager.queryStore(page);
	}

	@Override
	public Store addStore(Store record, String createUser){
		return storeManager.addStore(record, createUser);
	}

	@Override
	public Store editStore(Store record, String updateUser){
		return storeManager.editStore(record, updateUser);
	}

	@Override
	public Store editStorePartInfo(Store record, String updateUser){
		return storeManager.editStorePartInfo(record, updateUser);
	}

}
